package jsonObjects;


import java.util.Date;

public class Files {
    private String id;
    private String name;
    private Date created;
    private Attributes[] attributes;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Files() {
    }

    public Files(String name, Date created) {
        this.name = name;
        this.created = created;
    }

    public Attributes[] getAttributes() {
        return attributes;
    }

    public void setAttributes(Attributes[] attributes) {
        this.attributes = attributes;
    }

    public Attributes getAttributeByName(String name) {
        for (Attributes a : getAttributes())
            if (a.getName().equals(name)) return a;
        return null;
    }
}
